This application claims the priority of Korean Patent Application No. 2004-54714, filed on Jul. 14, 2004, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to a method of and an apparatus for predicting discrete cosine transform coefficients, and more particularly, to a discrete cosine transform coefficient prediction method and apparatus, which perform a discrete cosine transform on a row and column of pixel blocks nearest to a transform coefficient to be predicted in a discrete cosine transform block to be predicted among pixel blocks adjacent to the discrete cosine transform block to be predicted to create a prediction coefficient for the transform coefficient to be predicted, and predict the transform coefficient using the created prediction coefficient.
2. Description of the Related Art
Compressing data to a digital format, particularly, compressing image signals is essential in various multimedia environments. However, since image signals include much information, many limitations exist in efficiently transmitting, storing and processing such image signals. To reduce such limitations, international standards, such as MPEG-2, MPEG-4, H.263 and H.26L, define compression stream grammars and coding methods.
By dividing an input image into pixel blocks in a predetermined area, for example, to 8×8 pixel blocks and performing a discrete cosine transform (DCT) on each pixel block, pixel coefficients arranged with high spatial correlations are converted to various frequency components from low-frequency components to high-frequency components. In a discrete cosine transform block, no correlation exists between frequency components and the energy of signals is focused on low-frequency components. Accordingly, by predicting transform coefficients located at a first row and a first column where low-frequency components are concentrated in a discrete cosine transform block, it is possible to efficiently compress an image.
FIG. 1 is a view for explaining a conventional discrete cosine transform coefficient prediction method. In FIG. 1, blocks 110 through 130 are discrete cosine transform blocks. To predict transform coefficients 1 through 8 of the discrete cosine transform block 130, transform coefficients A through H of the discrete cosine transform block 110 are used as prediction coefficients for the transform coefficients. 1 through 8. Meanwhile, to predict transform coefficients 1, 9, 17, 25, 33, 41, 49 and 57 of the discrete cosine transform block 130, transform coefficients I, J, K, L, M, N, O and P of the discrete cosine transform block 120 are used as prediction coefficients for the transform coefficients 1, 9, 17, 25, 33, 41, 49 and 57. By creating prediction values for the transform coefficients to be predicted based on differences between the prediction coefficients and the transform coefficients to be predicted and quantizing the created prediction values, an image may be efficiently compressed.
FIG. 2 is a view for explaining correlation coefficients between transform coefficients and prediction coefficients in the conventional discrete cosine transform coefficient prediction method.
A correlation coefficient between a prediction coefficient and a transform coefficient represents similarity between the prediction coefficient and the transform coefficient. As the correlation coefficient is higher, the prediction value which is calculated based on the difference between the transform coefficient and the prediction coefficient, is smaller. Thus, the smaller prediction value allows more efficient compression of an image. A correlation coefficient between a prediction coefficient and a transform coefficient can be calculated by Equation 1.
                              p          ^                =                  r          =                                    ∑                                                (                                                            x                      1                                        -                                          x                      _                                                        )                                ⁢                                  (                                                            y                      1                                        -                                          y                      _                                                        )                                                                                    ∑                                                                            (                                                                        x                          1                                                -                                                  x                          _                                                                    )                                        2                                    ⁢                                                            ∑                                                                        (                                                                                    y                              1                                                        -                                                          y                              _                                                                                )                                                2                                                                                                                                                    (        1        )            
Here, x1 is a location of the prediction coefficient and y1 is a location of the transform coefficient.
Therefore, to more efficiently compress a predetermined image, it is preferable to create a prediction value for a transform coefficient of a discrete cosine transform block to be predicted, using a prediction coefficient with a higher correlation to the transform coefficient of the discrete cosine transform block.